<?php
require_once("conn.php");
$sql="select * from artcontent where Art_id=".$_GET['Art_id'];
$result=mysql_query($sql) OR die("<br/>ERROR:<b>".mysql_error()."</b><br/>产生的问题的SQL:".$sql);
$row=mysql_fetch_array($result);
$class=$row['cs_id'];
    $sql="delete from artcontent where Art_id=".$_GET['Art_id'];
    mysql_query($sql) OR die("<br/>ERROR:<b>".mysql_error()."</b><br/>产生的问题的SQL:".$sql);
        $sql_addart_num="UPDATE  artclass SET artnum=artnum-1 WHERE cs_id='$class'";
    mysql_query($sql_addart_num) OR die("<br/>ERROR:<b>".mysql_error()."</b><br/>SQL:".$sql);
    echo "<script>alert('文章删除成功!!'); window.location.href='artlist.php';</script>";

?>